The constitutive relation of the quasi-static deformation on two dimensional packed samples of polygons is calculated using molecular dynamic simulations. The stress values at which the system remains stable are bounded by a failure surface, that shows a power law dependence on the pressure. Below the failure surface, non linear elasticity and plastic deformation are obtained, which are evaluated in the framework of the incremental linear theory. The results shows that the stiffness tensor can be directly related to the micro-contact rearrangements. The plasticity obeys a non-associated flow rule, with a plastic limit surface that does not agree with the failure surface.